import {useRoutes} from 'react-router-dom'
import {useAppDispatch,useAppSelector} from '@/store/hooks'
import {useEffect} from 'react'
import {getRoutesAsync} from '@/store/modules/auth'
export default function App() {
  const dispatch=useAppDispatch()
  useEffect(()=>{
    dispatch(getRoutesAsync)
  },[])
  const routes=useAppSelector(state=>{
    return state.auth.routes
  })
  console.log('routes',routes);
  
  return useRoutes(routes)
}
